#include <http/http.hpp>
namespace http{
namespace _status{
  const std::string& get_descriptor(const status_code& code){

    static std::map<status_code, std::string> descriptor_map = {
        {ok, "OK"},
        {bad_request, "Bad Request"},
        {not_found, "Not Found"},
        {server_error, "Internal Server Error"},
        {not_impements, "Not Implemented"},
      };
      auto it = descriptor_map.find(code);
      if(it != descriptor_map.end()){
        return it->second;
      }
      else throw std::logic_error("http not found status code");
    }
  }
};